import React from "react";
import { BrowserRouter, Routes, Route } from "react-router-dom";
import Home from "./views/Home";
import List from "./views/List";
import About from "./views/About";
/*
    目标：
        react-router-dom 的基本使用

        1. 下载安装
        2. 导入 BrowserRouter, Routes, Route
            BrowserRouter - 历史模式的路由
            Routes 路由表
            Route 每一个路由
        3. 写下面的结构
            path指得是路由路径 
            element指向路由对应的组件
*/

export default function App() {
  return (
    <BrowserRouter>
      <Routes>
        <Route path="/home" element={<Home />} />
        <Route path="/list" element={<List />} />
        <Route path="/about" element={<About />} />
      </Routes>
    </BrowserRouter>
  );
}
